[PATCH] [PowerPC] Indicate that PPC32PICGOT clobbers LR (#154654)
authorJosh Stone <jistone@redhat.com>
Mon, 25 Aug 2025 22:31:27 +0000 (15:31 -0700)
committerSylvestre Ledru <sylvestre@debian.org>
Thu, 25 Dec 2025 16:38:13 +0000 (17:38 +0100)
commit9f74b0fb7502d0afb821095185bad433aedc25d0
tree5a5b577d4f99c9e475e41e7834e69247b1b240ab
parent7d2cd3f77c906421030bb8cbbb2992482929ad47
[PATCH] [PowerPC] Indicate that PPC32PICGOT clobbers LR (#154654)

This pseudo-instruction emits a local `bl` writing LR, so that must be
saved and restored for the function to return to the right place. If
not, we'll return to the inline `.long` that the `bl` stepped over.

This fixes the `SIGILL` seen in rayon-rs/rayon#1268.

Gbp-Pq: Name powerpc-fix-SIGILL.diff
llvm/lib/Target/PowerPC/PPCInstrInfo.td
llvm/test/CodeGen/PowerPC/tls-picgot.ll [new file with mode: 0644]